package com.example.demo.dao;

import com.example.demo.entity.StudyroomEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface StudyroomDao {

    /**
     * 通过ID查询单条数据
     */
    public StudyroomEntity queryStudyroomById(Integer sid);


    /**
     * 通过实体作为筛选条件查询
     */
    public List<StudyroomEntity> queryStudyroomAll();

    /**
     * 新增数据
     */
    public int insertStudyroom(StudyroomEntity studyroom);

    /**
     * 修改数据
     */
    public int updateStudyroom(StudyroomEntity studyroom);

    /**
     * 通过主键删除数据
     */
    public void deleteStudyroomById(Integer sid);

    //重名
    public StudyroomEntity queryStudyroomByName(String sname);

    public List<StudyroomEntity> selectByBidStudyRoom(int bid);

}